package top.saplf.sileny.net.netease

/**
 * @author saplf on 2017/5/15
 */
data class SearchItem<out R : Result>(
        val code: Int,
        val result: R?
) {
    fun isSuccess(): Boolean {
        return code == 200
    }
}

interface Result

data class SongResult(
        val songCount: Int,
        val songs: List<Song>?
) : Result

data class Song(
        val id: Long,
        val name: String,
        val mvid: Long
)

data class Lyric(
        val code: Int,
        val lrc: Lrc?
) {
    fun isSuccess(): Boolean {
        return code == 200
    }
}

data class Lrc(
        val version: Int,
        val lyric: String?
)

data class Singer(
        val id: Long,
        val name: String,
        val picUrl: String?,
        val alias: List<String>,
        val albumSize: Int,
        val picId: Long
)

data class AlbumResult(
        val albumCount: Int
)
